<c:choose xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:c="http://java.sun.com/jstl/core"> 
    
    <c:when test="#{currentuser.logged==false}">
        <div class="box">
            <h:form id="loginForm" >
                <dl>
                    <dt class="boxHeader">Login</dt>
                    <dd class="boxContent">
                        <h:message for="loginForm" layout="table" />
                        <dl>
                            <dt>Login : </dt>
                            <dd><h:inputText value="#{currentuser.userLogged.email}" size="16" /></dd>
                            <dt>Pass </dt>
                            <dd><h:inputSecret value="#{currentuser.userLogged.password}" size="16" /></dd>
                            
                            <dd>
                                <h:commandButton action="#{currentuser.loggin}" value="Se connecter" class="formButton" style="width: 166px;"/>
                                
                            </dd>
                            
                        </dl>
                    </dd>
                </dl>
                <dl>
                    <dt class="boxFooter">
                        <h:commandLink action="#{currentuser.join}"  ><h:outputText  value="Creer un compte"/></h:commandLink>
                    </dt>
                </dl>
            </h:form>
        </div>
    </c:when>
    
    <c:otherwise>
        <div class="box">
            <dl>
                <dt class="boxHeader">Bienvenu, #{currentuser.userLogged.prenom}</dt>
                <dd class="boxContent">
                    <h:form>
                        <dl>
                            <dd>Vous etes connecte !</dd>
                            
                            <dd>
                                <ul>
                                    <li id="menu_public_home"><a href="public_index.jsf">Accueil</a></li>
                                    <li id="menu_member_lent"><a href="member_resPreteur.jsf">Vos Prets</a></li>
                                    <li id="menu_public_rent"><a href="member_resfinancement.jsf">Vos Fianancement</a></li>
                                    <li id="menu_public_resource"><a href="member_projet.jsf">Vos Projets</a></li>
                                    <c:if test="#{currentuser.adminLogged}" >
                                        <li id="menu_admin_index"><a href="admin_index.jsf">Administration</a></li>
                                    </c:if>
                                </ul>
                            </dd>

                            <dd>
                                <h:commandButton action="#{currentuser.deconnexion}" value="Deconnexion" class="formButton" style="width: 166px;"/>
                            </dd>
                        </dl>
                    </h:form>
                </dd>
            </dl>
        </div>
    </c:otherwise>
    
</c:choose>
